package com.example.demo.service.admin;

import com.example.demo.entity.User;
import com.example.demo.mapper.LoginMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginAdminService {

    @Autowired
    private LoginMapper loginMapper;

    /**
     * 用户登录
     * @param user
     * @return
     */
    public boolean userLogin(User user) {
        int num = loginMapper.userLogin(user);
        return num > 0 ? true : false;
    }
}
